package com.waijiaojun.tpo.service;

import com.waijiaojun.tpo.service.baidu.BaiduAccessTokenService;
import com.waijiaojun.tpo.utils.Constants;
import com.waijiaojun.tpo.utils.HttpUtil;
import com.waijiaojun.tpo.utils.UserUtil;
import com.waijiaojun.tpo.vo.baidu.BaiduApiYuyinVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Peter on 2018/4/11.
 */
@Service
public class BaiduYuyinService {

    @Autowired
    private BaiduAccessTokenService baiduAccessTokenService;
    public BaiduApiYuyinVo receiveToken() {
        String accessToken = baiduAccessTokenService.getAccessToken();
        BaiduApiYuyinVo vo = new BaiduApiYuyinVo();
        vo.setToken(accessToken);
        String openid = UserUtil.getCurrentUserOpenId();
        vo.setCuid(openid);
        return vo;
    }


}
